home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / MacPerl 506 appl folder.sit / MacPerl 506 appl folder / Mac_Perl_506r1m_appl / lib / importenv.pl < prev    next >
Text File  |  1994-12-26  |  355b  |  17 lines

  1. ;# $RCSfile: importenv.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:24:02 $
  2.  
  3. ;# This file, when interpreted, pulls the environment into normal variables.
  4. ;# Usage:
  5. ;#    require 'importenv.pl';
  6. ;# or
  7. ;#    #include <importenv.pl>
  8.  
  9. local($tmp,$key) = '';
  10.  
  11. foreach $key (keys(ENV)) {
  12.     $tmp .= "¥$$key = ¥$ENV{'$key'};" if $key =~ /^[A-Za-z]¥w*$/;
  13. }
  14. eval $tmp;
  15.  
  16. 1;
  17.